package com.key.w8.http1.invoker;

import com.key.w8.http1.entity.HttpObject;
import com.key.w8.http1.entity.HttpRequest;
import com.key.w8.http1.entity.HttpResponse;

/**
 * @Author: k8
 * @CreateTime: 2025-02-18
 * @Version: 1.0
 */

public interface Http1ReaderInvoker {
    /**
     *
     * http1协议的请求不需要StreamMessage来保存同一个流的帧，一次请求即传输完整的数据
     * 注：对于应用层来说是完整的，对于传输层来说会有黏包半包问题，但是netty已经处理好了
     * @param httpRequest
     */
    void onRequestRead(HttpRequest httpRequest);
    void onExecuteError(HttpObject httpObject,Throwable throwable);

    void onResponseRead(HttpResponse httpResponse);


}
